clear
set mem 10000m
set more off 

cd "C:\Users\lzeng\Dropbox\Reseach\Soccer project\Gilje Taillard Zeng_Replication"

/*Import the dataset for the replacement analysis*/

use Replacement_Analysis_Data.dta

/*Figure 2: Timing of human capital redeployment*/

eststo: areg appearance treated##purchase, absorb(year) cluster(club_year)

eststo: areg minutes treated##purchase, absorb(year) cluster(club_year)

eststo: areg goals treated##purchase, absorb(year) cluster(club_year)

eststo: areg assists treated##purchase, absorb(year) cluster(club_year)

esttab using Table8.csv, starlevels(* 0.1 ** 0.05 *** 0.01) r2(2) replace

eststo clear
